Ext.onReady(function(){
	var textForm = Ext.create('Ext.form.Panel',{
		title:'FormTest',
		bodyStyle:'padding:5 5 5 5',
		frame:true,
		height:500,
		width:300,
		id:'myform',
		renderTo:'aa',
		defaultType:'textfield',
		defaults:{
			labelSeparator:':',
			labelWidth:50,
			width:200,
			allowBlank:false,
			msgTarget:'side',
			labelAlign:'left'
		},
		items:[{
			fieldLabel : 'Name',
			name : 'username',
			id : 'username'
		},{
			fieldLabel:'PassWord',
			name:'password',
			inputType:'password' 
		},{
			xtype:'radiogroup',
			fieldLabel:'性别',
			columns:2,
			items:[{
				xtype:'radiofield',
				name:'sex',
				 boxLabel  : '男',
				inputValue:'mate',
				checked:true
			},{
				xtype:'radiofield',
				name:'sex',
				 boxLabel  : '女',
				inputValue:'famate'
			}]
		},{
			xtype: 'timefield',
	        name: 'in',
	        fieldLabel: 'Time In',
	        minValue: '6:00 AM',
	        maxValue: '8:00 PM',
	        increment: 30,
	        anchor: '100%'
		},{
        xtype: 'datefield',
        anchor: '100%',
        fieldLabel: 'From',
        name: 'from_date',
        maxValue: new Date()  // limited to the current date or prior
    }, {
        xtype: 'datefield',
        anchor: '100%',
        fieldLabel: 'To',
        name: 'to_date',
        value: new Date()  // defaults to today
    }],
		buttons:[{
			text:'提交'
		},{
			text:'重置',handler:function(){
				Ext.getCmp('myform').getForm().reset();
			}
		}]
	})
})